package com.web.model.constant;



/**
 * @title:Constant
 * @Description:项目中常用的静态属性
 * @email 223450427@qq.com
 * @author Administrator
 * @date Nov 12, 2016 9:08:41 PM
 */
public class Constant {
	
	public static final String SESSION_USER = "sessionUser";// 用户对象
	public static final String SESSION_UID = "sessionUserUid";// 用户id
	public static final String SESSION_CAPTCHA = "sessionCaptcha";
	public static final String SESSION_TOKEN = "tokenCode";
	public static String ORDER_DESC = "DESC";
	public static String ORDER_ASC = "ASC";
	
	public static final Long USER_BALANCE_TYPE_1 = 1l;
	public static final String USER_BALANCE_CONTEXT_1 ="充值";
	public static final Long USER_BALANCE_TYPE_2 = 2l;
	public static final String USER_BALANCE_CONTEXT_2 ="购买";
	public static final Long USER_BALANCE_TYPE_3 = 3l;
	public static final String USER_BALANCE_CONTEXT_3 ="开奖收益";
	public static final Long USER_BALANCE_TYPE_4 = 4l;
	public static final String USER_BALANCE_CONTEXT_4 = "提现";
	
	public static final String DATA_STR = "yyyy-MM-dd HH:mm:ss";
	public static final String DATA = "yyyy-MM-dd";
	public static final String DATA_HH = "HH:mm";
	
	public static String getUserBalanceContext(Long userBalanceType,Long termCd){
		if(userBalanceType == 2){
			return "购买" + termCd + "期产品";
		}else if(userBalanceType == 1){
			return USER_BALANCE_CONTEXT_1;
		}else if(userBalanceType == 3){
			return USER_BALANCE_CONTEXT_3;
		}else if(userBalanceType == 4){
			return USER_BALANCE_CONTEXT_4;
		}
		return null;
	}
	
	
}
